<template>
	<view>
		<view class="search">
			<view class="search-bg row-center" style="">
				<view class="type row-center">
					<view class="type-text row-center">
						商家
					</view>
					<image src="/static/images/arrow_down.png" class="arrow-down"></image>
				</view>
				<u-input class="input" prefixIcon="search" placeholder="搜索" border="none"
					prefixIconStyle="margin-left:26rpx">
					<template slot="suffix">
						<view class="search-btn row-center">搜索</view>
					</template>
				</u-input>
			</view>
		</view>
		
		<view class="row" style="margin: 20rpx;"> 
			<view :class="clickIndex==index?'type-active row-center':'type-normal row-center' " v-for="item,index in types">
				{{item.name}}
			</view>
		</view>
	
		<view class="item col" v-for="item in 5" @click="goItem(item)">
			<view class="item-top">
				<view class="row-between-center">
					<view class="row-center">
						<image src="/static/images/merchant.png" class="item-icon"></image>
						<view class="item-name">商家名称</view>
					</view>
					<view class="item-status-fail">
						未分配
					</view>
				</view>
				
				<view class="item-text" style="margin-top: 30rpx;">所属员工：张三</view>
				<view class="item-text">推荐用户：李四</view>
				<view class="item-text">店铺地址：山东省青岛市市南区广西路60号</view>
			</view>
		<view class="row-end">
			<view class="item-btn row-center" @click.stop="goAllot">分配</view>
		</view>
		</view>
	
	
	</view>
</template>

<script>
	export default {
		data() {
			return {
				clickIndex:0,
				types:[
					{'name':'读书会'},
					{'name':'读书会'},
					{'name':'读书会'},
					{'name':'读书会'},
				]
			}
		},
		methods: {
			goItem(item){
				uni.navigateTo({
					url:'/src/pages/merchant_merchants/detail'
				})
			},
			goAllot(){
				uni.navigateTo({
					url:'/src/pages/merchant_merchants/allot_person'
				})
			}
		}
	}
</script>
<style>
	page{
		 background: #F2F3F8;;
	}
</style>
<style lang="scss" scoped>

	.item{
		margin: 20rpx;
		padding: 32rpx 20rpx;
		border-radius: 12rpx;
		background-color:  #F7F8FC;
		.item-top{
			padding: 32rpx 20rpx;
			border-radius: 12rpx 0;
			background-color:  white;
		}
		.item-icon{
			width: 48rpx;
			height: 48rpx;
		}
		.item-name{
			color: #20252B;
			font-size: 32rpx;
			font-style: normal;
			font-weight: 500;
			line-height: 48rpx; 
		}
		.item-status-fail{
			color: #FF8934;
			font-size: 32rpx;
			font-style: normal;
			font-weight: 500;
			line-height: 48rpx; 
		}
		.item-status-done{
			color: #3B60D3;
			font-size: 32rpx;
			font-style: normal;
			font-weight: 500;
			line-height: 48rpx; 
		}
		.item-status-wait{
			color:  rgba(106, 104, 118, 0.45);
			font-size: 32rpx;
			font-style: normal;
			font-weight: 500;
			line-height: 48rpx; 
		}
		.item-text{
			color:  #6A6876;
			font-size: 24rpx;
			font-style: normal;
			font-weight: 400;
			line-height: 40rpx;
		}
		.item-btn{
			margin-top: 20rpx;
			width: 144rpx;
			height: 64rpx;
			flex-shrink: 0;
			border-radius: 32rpx;
			background: #3B60D3;
			color: #FFF;
			font-size: 24rpx;
			font-style: normal;
			font-weight: 500;
			line-height: 40rpx; /* 166.667% */
		}
	}
	
	.type-active{
		margin-right: 10rpx;
		padding: 6rpx 26rpx;
		border-radius: 8rpx;
		background: #347FFF;
		color: #FFF;
		font-size: 24rpx;
		font-style: normal;
		font-weight: 400;
		line-height: 40rpx; /* 166.667% */
	}
	.type-normal{
		padding: 6rpx 26rpx;
		margin-right: 10rpx;
		border-radius: 8rpx;
		background: #FFF;
		color: #676C7F;
		font-size: 24rpx;
		font-style: normal;
		font-weight: 400;
		line-height: 40rpx; /* 166.667% */
	}
	
	
	.search{
		padding: 20rpx;
		background: white;
	}
	.search-bg{
		background: #F6F7FB;
	}
	.type{
		margin: 10rpx;
		padding: 10rpx 20rpx;
		border-radius: 8rpx;
		background: #FFF;
		.type-text{
			color: #202430;
			font-size: 24rpx;
			font-style: normal;
			font-weight: 400;
			line-height: 40rpx; /* 166.667% */
		}
	}
	.arrow-down{
		width: 32rpx;
		height: 32rpx;
	}
	.search-btn{
		width: 120rpx;
		height: 60rpx;
		flex-shrink: 0;
		border-radius: 8rpx;
		background: #347FFF;
		color: #FFF;
		font-size: 24rpx;
		font-style: normal;
		font-weight: 400;
		line-height: 40rpx; /* 166.667% */
	}
</style>
